package com.centaline.invoke.conf;

import com.centaline.invoke.service.TeleiiGateway;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter;

/**
 * Created by caoyuan7 on 2018/2/1.
 */
@Configuration
public class HttpInvokerExporterConfiguraion {

	/**
	 * 注册httpinvoke的方法（DEMO）
	 * @param teleiiGateway
	 * @return
	 */
	@Bean("/remote/teleiiGateway")
	public HttpInvokerServiceExporter teleiiGatewayClient(TeleiiGateway teleiiGateway) {
		HttpInvokerServiceExporter exporter = new HttpInvokerServiceExporter();
		exporter.setServiceInterface(TeleiiGateway.class);
		exporter.setService(teleiiGateway);
		return exporter;
	}

}

